//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: cbtest.c 757 2007-05-10 08:19:31Z roger $
//

/*
** $Id: cbtest.c 757 2007-05-10 08:19:31Z roger $
*/

#include <gtk/gtk.h>

int
main(int argc, char *argv[])
{
	GtkClipboard *cb;
	GtkSelectionData *data;
	GdkNativeWindow plug_id;
	gchar *im_list;
	
	gtk_set_locale();
	gtk_init(&argc, &argv);
	
	/*
	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
	gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
	gtk_window_stick(GTK_WINDOW(window);

	socket = gtk_socket_new();
	g_object_signal_connect(G_OBJECT(socket), "plug-removed",
			        G_CALLBACK(unglugged), NULL);
	
	gtk_container_add(GTK_CONTAINER(window), socket);
	*/
	
	cb = gtk_clipboard_get(gdk_atom_intern("_UNIHAN_STATUS", FALSE));
	data = gtk_clipboard_wait_for_contents(cb, 
			gdk_atom_intern("PlugID", FALSE));
	plug_id = *(GdkNativeWindow*)data->data;
	//im_list = (gchar *)data->data;
	//g_message("im_list: %s", im_list);
	g_message("plug_id: %d", plug_id);
	
	return 0;
}

// vi:ts=4:nowrap:cin:expandtab
